#ifndef MAINVIEW_PARSER_H
#define MAINVIEW_PARSER_H

#include "desktop-element.h"

struct property_parser {
    gchar *name;
    JSBool (*setter)(js_engine *engine, desktop_element *widget, const gchar *key);
};

desktop_element *mainview_parse(js_engine *engine);
desktop_element *options_dialog_parse(js_engine *engine);
JSBool set_property_string_value(js_engine *engine, desktop_element *widget, const gchar *key);
JSBool set_property_integer_value(js_engine *engine, desktop_element *widget, const gchar *key);
JSBool set_property_float_value(js_engine *engine, desktop_element *widget, const gchar *key);
JSBool set_property_boolean_value(js_engine *engine, desktop_element *widget, const gchar *key);
JSBool set_property_function_value(js_engine *engine, desktop_element *widget, const gchar *key);
JSBool set_property_stub(js_engine *engine, desktop_element *widget, const gchar *key);

gboolean StringsXmlParse(js_engine *engine);

gboolean mainview_set_js_object(js_engine *engine, desktop_element *element);
#endif
